MODULE t1;
IMPORT Out, In, Math;
VAR x : INTEGER;
VAR y : INTEGER;
PROCEDURE F(VAR x : INTEGER);
BEGIN
  x := 89;
END F;

BEGIN
x := 10;
IF x > 1 THEN x := 2 END;
F(y);
Out.Int(x, 10)
END t1.

(*
java.lang.ClassCastException: org.antlr.runtime.tree.CommonTree cannot be cast to ru.msu.cmc.sp.oberon2.InterAST
	at ru.msu.cmc.sp.oberon2.Types.if_stat(Types.java:513)
	at ru.msu.cmc.sp.oberon2.Types.topdown(Types.java:259)
	at ru.msu.cmc.sp.oberon2.Types.topdown(Types.java:1)
	at org.antlr.runtime.tree.TreeRewriter$2.rule(TreeRewriter.java:108)
	at org.antlr.runtime.tree.TreeRewriter.applyOnce(TreeRewriter.java:61)
	at org.antlr.runtime.tree.TreeRewriter$1.pre(TreeRewriter.java:92)
	at org.antlr.runtime.tree.TreeVisitor.visit(TreeVisitor.java:56)
	at org.antlr.runtime.tree.TreeVisitor.visit(TreeVisitor.java:60)
	at org.antlr.runtime.tree.TreeRewriter.downup(TreeRewriter.java:95)
	at org.antlr.runtime.tree.TreeRewriter.downup(TreeRewriter.java:86)
	at ru.msu.cmc.sp.oberon2.Oberon2.analysis(Oberon2.java:29)
	at ru.msu.cmc.sp.oberon2.Oberon2.main(Oberon2.java:47)

*)